import {memberlist} from '../../../request/api'

const state = {
    memberList:[]
}

const getters = {
    getMember(state:any){
        return state.memberList
    }
}

const mutations = {
    GET_MEMBER(state:any,payload:any){
        state.memberList = payload
    }
}

const actions = {
    getMemberActions({commit}:any){
        memberlist().then(res => {
            console.log(res);
            if(res.code == 200){
                commit('GET_MEMBER',res.list)
            }
        })
    }
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced:true
}